package com.imu.purse.modules.app.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.imu.purse.modules.app.dao.ImuUserIdentiryMapper;
import com.imu.purse.modules.app.entity.ImuUserIdentityEntity;
import com.imu.purse.modules.app.service.ImuUserIdentityService;

@Service("imuUserIdentityService")
public class ImuUserIdentityServiceImpl implements ImuUserIdentityService {

	@Autowired
	private ImuUserIdentiryMapper mapper;
	
	@Override
	public int saveData(ImuUserIdentityEntity entity) {
		// TODO Auto-generated method stub
		return mapper.insert(entity);
	}

	@Override
	public int delByUserId(Long userId) {
		// TODO Auto-generated method stub
		return mapper.delByUserId(userId);
	}

	@Override
	public ImuUserIdentityEntity selectByUserId(ImuUserIdentityEntity entity) {
		// TODO Auto-generated method stub
		return mapper.selectOne(entity);
	}

	@Override
	@Transactional
	public int update(ImuUserIdentityEntity imuUser) {
		// TODO Auto-generated method stub
		return mapper.updateByPrimaryKeySelective(imuUser);
	}

}
